<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增讲座报告')"/>
    <th:block th:include="include :: datetimepicker-css"/>
    <style>
        .form-group{
            flex: 0 0 50%;
            box-sizing: border-box;
        }
       .card{
           display: flex;
           flex-wrap: wrap;
       }
    </style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-report-add">
        <div class="card">
            <div class="form-group" >
                <label class="col-sm-3 control-label">学院：</label>
                <div class="col-sm-8" >
<!--                    <input name="xueyuan" class="form-control" type="text" >-->
                    <select name="xueyuan" class="form-control" th:with="type=${@dict.getType('sys_xueyuan')}" required>
                        <option value="">请选择学院</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">教研室：</label>
                <div class="col-sm-8">
                    <input name="keyanshi" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">工号：</label>
                <div class="col-sm-8">
                    <input name="jobId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">教师姓名：</label>
                <div class="col-sm-8">
                    <input name="teacherName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">行政职务：</label>
                <div class="col-sm-8">
                    <input name="xingzhengPosition" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">社会职称：</label>
                <div class="col-sm-8">
                    <select name="socialTitle" class="form-control m-b" th:with="type=${@dict.getType('social_title')}">
                        <option value="">请选择社会职称</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">校内职称：</label>
                <div class="col-sm-8">
                    <select name="schoolTitle" class="form-control m-b" th:with="type=${@dict.getType('tea_zhicheng')}">
                        <option value="">请选择校内职称</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-3 control-label is-required">主办单位：</label>
                <div class="col-sm-8">
                    <input name="hostUnit" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">讲座时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
<!--                        <input name="reportTime" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd" type="text" required>-->
                        <input name="reportTime" autocomplete="off" class="form-control" placeholder="yyyy-MM-dd-HH-mm" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label is-required">讲座地点：</label>
                <div class="col-sm-8">
                    <input name="reportPlace" class="form-control" type="text" required>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label is-required">讲座主题：</label>
                <div class="col-sm-8">
                    <input name="reportTheme" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">讲座题目：</label>
                <div class="col-sm-8">
                    <input name="reportSubject" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">参与人数：</label>
                <div class="col-sm-8">
                    <input name="reportNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">报告时长：</label>
                <div class="col-sm-8">
                    <input name="reportDuration" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">分类：</label>
                <div class="col-sm-8">
                    <input name="reportClassify" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">科研分：</label>
                <div class="col-sm-8">
                    <input name="reportKeyanfen" class="form-control" type="text">
                </div>
            </div>
        </div>
    </form>
</div>
<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
        </button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
        </button>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
    var prefix = ctx + "system/report"
    $("#form-report-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.saveTab(prefix + "/add", $('#form-report-add').serialize());
        }
    }

    // $("input[name='reportTime']").datetimepicker({
    //     format: "yyyy-mm-dd",
    //     minView: "month",
    //     autoclose: true
    // });

    $("input[name='reportTime']").datetimepicker({
        format: "yyyy-mm-dd hh:ii",
        minView: "hour",
        autoclose: true
    });
</script>
</body>
</html>